package com.zf.flutter_app;

import android.os.Bundle;

import io.flutter.app.FlutterActivity;
import io.flutter.plugin.common.BasicMessageChannel;
import io.flutter.plugin.common.MessageCodec;
import io.flutter.plugin.common.StringCodec;
import io.flutter.plugins.GeneratedPluginRegistrant;

public class MainActivity extends FlutterActivity {


  public BasicMessageChannel mMessageChannel;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    GeneratedPluginRegistrant.registerWith(this);
    MapViewRegistrant.registerWith(this);
    // 直接 new MethodChannel，然后设置一个Callback来处理Flutter端调用
    MessageCodec<String> code = StringCodec.INSTANCE;
    mMessageChannel = new BasicMessageChannel<String>(getFlutterView(), "messageChannelName", code);
  }





  @Override
  protected void onResume() {
    super.onResume();
  }

  @Override
  protected void onPause() {
    super.onPause();
  }

  @Override
  protected void onDestroy() {
    super.onDestroy();
  }
}
